﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Altairis.FluffyCloud.Data {
    public class UserAclEntry : AclEntry {
        public const string OperationSendPrivateMessage = "sendpm";
        public const string OperationReadProfileContacts = "profile-contacts";
        public const string OperationReadProfilePersonal = "profile-personal";

        [Required]
        public string UserName { get; set; }
        public virtual User User { get; set; }

        public override string OperationDisplayName {
            get {
                switch (this.Operation) {
                    case OperationReadProfileContacts:
                        return "Zobrazit kontaktní údaje";
                    case OperationReadProfilePersonal:
                        return "Zobrazit údaje o uživateli";
                    case OperationSendPrivateMessage:
                        return "Přijímat soukromé zprávy";
                    default:
                        return this.Operation;
                }

            }
        }
    }
}
